home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_endlevel.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  97 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_EndLevel.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     startup
  13.     message     crossed
  14.     
  15.     thing       player      local
  16.     thing       indy        local
  17.     thing       fadeThing
  18.     thing       ghostThing
  19.     thing       targ1
  20.     
  21.     surface     surf_End
  22.     
  23.     template    tpl_Actor=indy_sh_actor     local
  24.     
  25.     int         done=0      local
  26.     
  27. end
  28.  
  29. # ========================================================================================
  30.  
  31. code
  32.  
  33. startup:
  34.  
  35.     SetThingAlpha(fadeThing, 0.0);
  36.     return;
  37.  
  38. # ========================================================================================
  39.  
  40. crossed:
  41.  
  42.     player = GetLocalPlayerThing();
  43.     
  44.     if((GetSenderRef() == surf_End) && (done == 0))
  45.     {
  46.         done = 1;
  47.         
  48.         MakeMeStop();
  49.         StartCutscene(2);
  50.         
  51.         SetCameraFadeThing(2, fadeThing, ghostThing, 0);
  52.         
  53.         Sleep(0.01);
  54.         SetCurrentCamera(2);
  55.         ThingFadeAnim(fadeThing, 0, 1, 1.5, 0);
  56.         
  57.         # create indy actor
  58.         indy = CreateThing(tpl_Actor, player);
  59.         CaptureThing(indy);
  60.         
  61.         # outfit indy actor
  62.         CopyPlayerHolsters(player, indy);
  63.         
  64.         # hide player show actor
  65.         SetThingFlags(player, 0x80000);
  66.         ClearThingFlags(indy, 0x80000);
  67.         
  68.         # walk actor to target1
  69.         AISetMoveSpeed(indy, 1.2);
  70.         AISetLookThing(indy, targ1);
  71.         AISetMoveThing(indy, targ1, 0);
  72.         
  73.         Sleep(2.0);
  74.         
  75.         ##### Debug only remove before ship ##########
  76.         # Get the player into position
  77.         #CopyOrientAndPos(indy, player);
  78.         
  79.         # hide actor show player
  80.         #SetThingFlags(indy, 0x80000);
  81.         #ClearThingFlags(player, 0x80000);
  82.  
  83.         # Return control to player
  84.         #ClearActorFlags(player, 0x200000);
  85.         ##############################################
  86.         
  87.         EndCutscene();
  88.         JonesEndLevel();
  89.     }
  90.     
  91.     return;
  92.         
  93. # ========================================================================================
  94.  
  95. end
  96.  
  97.